<?php defined('SYSPATH') OR die('No direct access allowed.');?>
<!-- BEGIN POST FORM -->
<form method="POST" class="editor_form">
<h2><?=Kohana::lang('post.'.$action.'.title')?></h2>
	<? message::render()?>
	<ol class="form editor">
		<input type="hidden" name="forum_id" value="<?=$category->id?>" />
		<? if (isset($post)): ?><input type="hidden" name="id" value="<?=$post->id?>" /><?endif;?>
		<li>
		<? message::render('validation', 'title')?>
			<label for="title"><?=Kohana::lang('post.title.label')?></label>
			<input type="text" name="title" id="title" maxlength="100" value="<?=message::custom('title')?>"/>
		</li>
		<li>
		<? message::render('validation', 'text')?>
			<label for="text"><?=Kohana::lang('post.text.label')?></label>
			<?=$editor?>
		</li>
		<? if (!Captcha::instance()->promoted()): ?>
		<li>
			<? message::render('validation', 'captcha');?>
			<label for="captcha"><?=Kohana::lang('post.captcha.label')?></label>
			<p class='captcha_container'><?=Captcha::instance()?><?=form::input('captcha')?></p>
		</li>
		<? endif; ?>
		<li>
			<input type="submit" value="<?=Kohana::lang('post.'.$action.'.submit')?>">
		</li>
	</ol>
</form>
<!-- END POST FORM -->